"""
@Project ：HD_project 
@File    ：config.py
@IDE     ：PyCharm 
@Author  ：靓仔
@Date    ：2023/12/14 0014 8:54 
"""

import json
from urllib.parse import urljoin
import requests

session_request = requests.Session()
HEADERS = {
    'Accept': 'application/json, text/plain, */*',
    'Accept-Encoding': 'gzip, deflate',
    'Accept-Language': 'zh-CN,zh;q=0.9',
    'Autothrowerror': 'true',
    'Connection': 'keep-alive',
    'Content-Length': '80',
    'Content-Type': 'application/json;charset=UTF-8',
    'Ctp-T-Code': '0002200000080659',
    'Host': '10.6.10.110',
    'Origin': 'http://10.6.10.110',
    'Ratio': '945*1512',
    'Referer': 'http://10.6.10.110/',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)'
                  'Chrome/119.0.0.0 Safari/537.36'}
BASE_URL = "http://10.6.10.110/"

account = "ailisong"
# account = "yanzhi"
# password = "DZDR1M81FcALjaYAXpRv/nSA2kYcWRXemwE09Txa1AU="  # 123456
password = "Sr/8IoN2tw+7VL/7nWJyMph3cQviFwU5TpA5XtqmzN4=" # hello


def session_login():
    url = urljoin(BASE_URL, "jadp-api/auth/session")
    data = {"account": account, "password": password}
    res = json.loads(session_request.post(url=url, json=data, headers=HEADERS).text)
    res = res["result"]["data"]["user"]["userId"]
    return res


TODO_PLAN_ACTIVITY_DICT = {"zdgl_zdjh_nwzb_bmnbsh": "部门内审核", "zdgl_zdjh_nwzb_bmfzrsh": "部门负责人审核",
                           "zdgl_zdjh_nwzb_fgbsp": "法规部审批", "zdgl_zdjh_nwzb_fgbsh": "法规部审核",
                           "zdgl_gzzd_nwzb_fgbsd": "法规部审定"}






























